package com.central.scheduler.spi.task.request;


import com.central.common.entity.DataRelated;
import com.central.common.enums.EngineType;
import com.central.common.enums.PrivilegeType;
import com.central.common.model.DatasourceInfo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @author Tindy
 * @date 2021/10/26
 * @describe SQL Task ExecutionContext
 */
@Getter
@Setter
public class SQLTaskExecutionContext implements Serializable {

    /**
     *
     */
    private DatasourceInfo datasource;

    /**
     * DefaultFS
     */
    private String defaultFS;

    private List<UdfFuncRequest> udfs;

    private String queue;
    private EngineType engine;
    private Map<String,String> setParams;

    //key is datasourceId.dbname.tablename,value is privilege list
    private Map<String,Set<PrivilegeType>> tablePrivileges;

    private List<Map<String, Set<PrivilegeType>>> needPrivileges;
}
